/**
 * 
 */
package oas.domain;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 
 * 工作部门类
 * 
 * @author wjy
 * @version 1.0.0
 *
 */
public class Workcell {
	
	@NotNull
	private Long id;

	@NotNull
	@Size(min = 1, max = 30)
	private String name;

	private boolean available;
	private List<Workcell> childWorkcells;


	public Workcell() {
		
	}

	/**
	 * @param id 部门id
	 * @param name 部门名称
	 * @param available 是否还存在
	 * @param childWorkcells 子部门列表
	 */
	public Workcell(Long id, String name, boolean available, List<Workcell> childWorkcells) {
		super();
		this.id = id;
		this.name = name;
		this.available = available;
		this.childWorkcells = childWorkcells;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}
	
	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * @return the available
	 */
	public boolean isAvailable() {
		return available;
	}
	
	/**
	 * @param available the available to set
	 */
	public void setAvailable(boolean available) {
		this.available = available;
	}

	/**
	 * @return the childWorkcells
	 */
	public List<Workcell> getChildWorkcells() {
		return childWorkcells;
	}

	/**
	 * @param childWorkcells the childWorkcells to set
	 */
	public void setChildWorkcells(List<Workcell> childWorkcells) {
		this.childWorkcells = childWorkcells;
	}	
	
}
